<%@page import="wt.org.WTUser"%>
<%@page import="ext.tianma.part.MyPartUtil"%>
<%@page import="wt.query.KeywordExpression"%>
<%@page import="wt.vc.VersionControlHelper"%>
<%@page import="ext.tianma.number.util.PartUtil"%>
<%@page import="wt.fc.PersistenceHelper"%>
<%@page import="wt.query.SearchCondition"%>
<%@page import="wt.fc.QueryResult"%>
<%@page import="wt.part.WTPartMaster"%>
<%@page import="wt.query.QuerySpec"%>
<%@page import="wt.part.WTPart"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<script type="text/javascript" src="../../javascript/jQuery1.7.js"></script>
<script type="text/javascript">
  	function test(){
  		var sss = {
  				
  			    	 "parts":"[{\"model\":\"CPXH1\",\"type\":\"LCM液晶显示模组\"},{\"model\":\"CPXH\",\"type\":\"LCD液晶显示屏\"}]",   
  			    	 "userCode":"xin_gao1",   
  			    	 "ibaValues":{"finishedGoodDimension":"消费品","marketSegments":null,"finishedGoodUse":null,
  			    	"partMainSpecification":"1","finishedGoodResolution":"1.0","finishedGoodMaskNumber":null,
  			    	"finishedGoodDisplayMode":null,"finishedGoodLCDArrangement":"11.0","finishedGoodLineBody":"G4.5",
  			    	"finishedGoodGlassThickness":"33.0","finishedGoodLCDType":null,"customerName":"WW",
  			    	"modulesDevelopedLand":"深圳天马","panelDevelopedLand":"上海天马","TPlensLaminatingOrigin":"深圳天马",
  			    	"panelPlaceOfOrigin":null,"moduleOrigin":"深圳天马","ICType":null,"ConnectorType":null,"PolarizerType":null,
  			    	"GrayscaleReverseDirection":null,"finishedGoodSize":"11.0","productClassification":null,"resolutiontype":"Mono",
  			    	"specialMonitor":"是"}
  			
	};
  		$.ajax({
            type:"post",
            contentType: "text/html;charset=utf-8",
          //  contentType: "application/json;charset=UTF-8",
            //url:"http://plm-training.elead.cn/Windchill/servlet/rest/tmEcoSingleSearch?param="+encodeURI('{datalist:[{partnumber:PART_XML111}]}'),
		//	 url:"http://plmdev.tianma.cn/Windchill/app/ECOControl/tmBOMSearch?number=TM017FFS01-00&view=A.10",
			//TM017FFS01-00
           	url:"http://plmdev.tianma.cn/Windchill/app/rfq/rfqPart",
			dataType:"text",
            data:JSON.stringify(sss),
            complete:function(msg){
                var str = msg.responseText;
               //var arra =  $.parseJSON( jsonstr );
                alert(str);
                
            }
		})
  	}
  
  </script>
  <title>RFQ Test</title>
</head>

<body>
	<input type="button" value="Test" onclick="test()">
</body>
<%
	WTUser user = null ;
	String username = "gaojinwang_test";
	QuerySpec qs = new QuerySpec(WTUser.class);
	SearchCondition sc = new SearchCondition(WTUser.class,WTUser.NAME,"=",username);
	qs.appendWhere(sc);
	QueryResult qr = PersistenceHelper.manager.find(qs);
	while(qr.hasMoreElements())
	{
		user = (WTUser)qr.nextElement();
		out.print("---"+user.NAME);
	}
%>
</html>